package com.adapter.demo5;

import java.io.BufferedWriter;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.OutputStreamWriter;

public class Test {

	public static void main(String[] args) {
		// 创建输出字节流
		try {
			FileOutputStream fos = new FileOutputStream("D:/demo/test.txt");
			// 字节流转字符流（适配器）
			OutputStreamWriter os = new OutputStreamWriter(fos);
			// 装饰者
			BufferedWriter bos = new BufferedWriter(os);
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

}
